// 若要修改state的值就将操作放入此文件

export default { //存全局变量
    state: {
       is_record: false, // 是否是录像
        a_steps: "", // 两名玩家的行走方式
        b_steps:"",
        record_loser: "",
    },
    getters: {
    },
    mutations: { //修改数据
        updateIsRecord(state, is_record) { // 当后端与前端的websocket成功连接后更新数据
            state.is_record = is_record;
        },
        updateSteps(state, data) {
            state.a_steps = data.a_steps;
            state.b_steps = data.b_steps;
        },
        updateRecordLoser(state, loser) {
            state.record_loser = loser;
        }
    },
    actions: {
    },

    modules: {
    }
}